function containsRepeatingLetter (str) {
  for (let i = 1; i < str.length; i++) {
    if ((str[i] >= 'a' && str[i] <= 'z') || (str[i] >= 'A' && str[i] <= 'Z')) {
      if (str[i] === str[i - 1]) {
        return true
      }
    }
  }
  return false
}
let str = 'rattler'
console.log(containsRepeatingLetter(str));